package com.warm.androidstudy;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.widget.Button;

import com.warm.androidstudy.view.banner.BannerActivity;
import com.warm.androidstudy.view.dialog.StudyDialogActivity;
import com.warm.androidstudy.view.liveData.LiveDataActivity;
import com.warm.androidstudy.view.liveData.TestViewModelActivity;
import com.warm.androidstudy.view.ratingBar.RatingBarActivity;
import com.warm.androidstudy.view.room.model.RoomActivity;

public class MainActivity extends AppCompatActivity {
    private Button dialogBtn;
    private Button liveDataBtn;
    private Button testViewModel;
    private Button room;
    private Button ras;
    private Button banner;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        dialogBtn = findViewById(R.id.btn_dialog);
        liveDataBtn = findViewById(R.id.btn_live_data);
        testViewModel = findViewById(R.id.btn_test_view_model);
        room = findViewById(R.id.btn_room);
        ras = findViewById(R.id.btn_ras);
        banner = findViewById(R.id.btn_banner);

        dialogBtn.setOnClickListener(v -> startActivity(new Intent(MainActivity.this, StudyDialogActivity.class)));
        liveDataBtn.setOnClickListener(v -> startActivity(new Intent(MainActivity.this, LiveDataActivity.class)));
        testViewModel.setOnClickListener(v -> startActivity(new Intent(MainActivity.this, TestViewModelActivity.class)));
        room.setOnClickListener(v -> startActivity(new Intent(MainActivity.this, RoomActivity.class)));
        ras.setOnClickListener(v -> startActivity(new Intent(MainActivity.this, RatingBarActivity.class)));
        banner.setOnClickListener(v -> startActivity(new Intent(MainActivity.this, BannerActivity.class)));


    }
}